package CtrlLayer;

import static org.junit.Assert.*;
import java.util.ArrayList;
import org.junit.Before;
import org.junit.Test;

import ModelLayer.Product;
/**
 * CtrlProductTest.java
 * @author Brian Lassen
 * @version 21. Marts 2012
 */
public class CtrlProductTest {

	@Before
	public void setUp() throws Exception {
	}

	@Test
	public final void testCtrlProduct() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testFindAllProducts() {
		ArrayList<Product> allProduct = new ArrayList<Product>();
		allProduct = CtrlProduct.findAllProducts();
		for (Product allProd : allProduct){
			System.out.println(allProd.getId() + " " + allProd.getName() + " " + allProd.getSalesPrice());
			System.out.println();
		}
	}

	@Test
	public final void testFindById() {
		Product myProduct = new Product();
		myProduct = CtrlProduct.findById(1000);
		System.out.println(myProduct.getId() + " " + myProduct.getName() + " " + myProduct.getCountryOfOrigin() + " " + myProduct.getMinStock());
		System.out.println(myProduct.getPurchasePrice() + " " + myProduct.getSalesPrice() + " " + myProduct.getRentPrice());
		System.out.println(myProduct.getType() + " " + myProduct.getClothingsize() + " " + myProduct.getColor());
		System.out.println(myProduct.getType() + " " + myProduct.getEqtype() + " " + myProduct.getDescription());
		System.out.println(myProduct.getType() + " " + myProduct.getFabric() + " " + myProduct.getCalibre());
		System.out.println();
	}

	@Test
	public final void testFindByName() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testUpdateProduct() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testCreateProduct() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testDeleteProduct() {
		fail("Not yet implemented"); // TODO
	}

}
